package com.h.files.selector.activity.util;

import android.util.Log;

public class LogUtils {
	
	private static String getTag(){
		StackTraceElement caller = Thread.currentThread().getStackTrace()[4];
		String callerClazzName = caller.getClassName();
        callerClazzName = callerClazzName.substring(callerClazzName.lastIndexOf(".") + 1);
        return callerClazzName+"."+caller.getMethodName()+"-L:"+caller.getLineNumber();
	}

	public static void e(String message) {
		e(getTag(), message,null);
	}
	public static void e(String message,Throwable tr) {
		e(getTag(), message,tr);
	}
	public static void e(String tag,String message){
		Log.e(tag, message);
	}
	public static void e(String tag,String message,Throwable tr) {
		Log.e(tag, message,tr);
	}

	public static void d(String message) {
		d(getTag(), message,null);
	}
	public static void d(String message,Throwable tr) {
		d(getTag(), message,tr);
	}
	public static void d(String tag,String message,Throwable tr) {
		Log.d(tag, message);
	}

	public static void i(String message) {
		i(getTag(), message,null);
	}

	public static void i(String tag,String message) {
		i(tag, message,null);
	}
	public static void i(String message,Throwable tr) {
		i(getTag(), message,tr);
	}
	public static void i(String tag,String message,Throwable tr) {
		Log.i(tag, message,tr);
	}
	public static void v(String message) {
		v(getTag(), message);
	}
	public static void v(String message,Throwable tr) {
		v(getTag(), message,tr);
	}
	public static void v(String tag,String message) {
		v(tag, message,null);
	}
	public static void v(String tag,String message,Throwable tr) {
		Log.v(tag, message,tr);
	}
}
